# -*- coding: utf-8 -*-
# @Time : 2023/12/10 16:00
# @Author : Lpb
# @File : pro6.py
# 给你一个字典，字典内容是一个查询接口的返回体，noteBodies是所有便签信息，怎么获取所有便签的noteid，以列表的形式整合
res = {
    "responseTime": 36,
    "noteBodies": [
        {
            "summary": "K+7KGjCoDl3fIwnxXfQPIQ==",
            "noteId": "458114392903b8e164f1d583fb63b949",
            "infoNoteId": "458114392903b8e164f1d583fb63b949",
            "bodyType": 0,
            "body": "Arrvft6YZvdqji9HTZ0TLgpzU2a4zB/Nz+qJR0NWdIM=",
            "contentVersion": 1,
            "contentUpdateTime": 1686818813993,
            "title": 'null',
            "valid": 0
        },
        {
            "summary": "K+7KGjCoDl3fIwnxXfQPIQ==",
            "noteId": "458114392903b8e164f1d583fb6b9123",
            "infoNoteId": "458114392903b8e164f1d583fb63b949",
            "bodyType": 0,
            "body": "Arrvft6YZvdqji9HTZ0TLgpzU2a4zB/Nz+qJR0NWdIM=",
            "contentVersion": 1,
            "contentUpdateTime": 1686818813993,
            "title": 'null',
            "valid": 0
        },
        {
            "summary": "K+7KGjCoDl3fIwnxXfQPIQ==",
            "noteId": "458114392903b52844f1d583fb63b949",
            "infoNoteId": "458114392903b8e164f1d583fb63b949",
            "bodyType": 0,
            "body": "Arrvft6YZvdqji9HTZ0TLgpzU2a4zB/Nz+qJR0NWdIM=",
            "contentVersion": 1,
            "contentUpdateTime": 1686818813993,
            "title": 'null',
            "valid": 0
        },
        {
            "summary": "K+7KGjCoDl3fIwnxXfQPIQ==",
            "noteId": "458114392903b8e1641123fb63b949",
            "infoNoteId": "458114392903b8e164f1d583fb63b949",
            "bodyType": 0,
            "body": "Arrvft6YZvdqji9HTZ0TLgpzU2a4zB/Nz+qJR0NWdIM=",
            "contentVersion": 1,
            "contentUpdateTime": 1686818813993,
            "title": 'null',
            "valid": 0
        }
    ]
}

note_ids = []

for note in res["noteBodies"]:
    note_id = note["noteId"]
    note_ids.append(note_id)

print(note_ids)

